/*
 * @(#)engineCtrlAction.java Jun 5, 2007
 * 
 * Copyright 2007 by ChinanetCenter Corporation.
 *
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * ChinanetCenter Corporation ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with ChinanetCenter.
 * 
 */
package com.cnc.fd.web;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.cnc.fd.Constants;
import com.cnc.fd.WsfdCache;
 
 

/**
 * @author 阿闲
 * @date   Jun 5, 2007
 * @version 1.0
 */
public class EngineCtrlAction extends HttpServlet {

	
	public void service(HttpServletRequest request, HttpServletResponse response)
	throws IOException, ServletException {
	
		if(request.getParameter("engineStatus") != null){
			
			//刷新缓存，临时放在这里
			if(request.getParameter("engineStatus").equals(Constants.TASK_ENGINE_RUN)){
				WsfdCache.cacheCustomerConfig();
				WsfdCache.cacheTimeoutConfig();
			}
			 
		}
		
		 
		response.setContentType("text/html; charset=UTF-8");

        ServletContext sc = getServletContext();      

        RequestDispatcher rd = sc.getRequestDispatcher("/WEB-INF/jsp/bas/engineCtrl.jsp");     

        rd.forward(request, response);

	}

}


